<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <title>会员资料</title>
    <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport">
    <meta content="yes" name="apple-mobile-web-app-capable">
    <meta content="black" name="apple-mobile-web-app-status-bar-style">
    <meta content="telephone=no" name="format-detection">
    <link rel="shortcut icon" href="/favicon.ico">
    <link rel="stylesheet" type="text/css" href="/H5/css/sm.min.css" />
    <link rel="stylesheet" type="text/css" href="/H5/css/reset.css?v=1" />
    <link rel="stylesheet" href="/H5/css/light7.min.css">
    <link rel="stylesheet" href="/H5/css/public.css">
    <link rel="stylesheet" type="text/css" href="/H5/css/user.css">
</head>
<body>
<div class="page-group ms-controller" :controller="members">
    <div class="page page-current" style="background: #efeff4">
        <header class="bar bar-nav">
            <a class="icon icon-left pull-left" href="javascript:window.history.go(-1);"></a>
            <a class="icon icon-home pull-right" href="/H5"></a>
            <h1 class="title">会员资料</h1>
        </header>

        <div class="content visibility">
            <div class="list-block" style="margin: 0">
                <div class="page page-current page-inited">
                    <div class="content" style="top:0;">
                        <div class="user-info">
                            <div class="info-top">
                                <a class="external" href="/H5/memberperfect"><img class="avator fl" :attr="{'src': @data.avatar_url}"></a>
                                <p>昵称：<span>{{@data.nickname}}</span>
                                    <span>会员级别:{{@data.level_text}}</span>
                                    <span>账户余额：{{@data.balance}}</span>
                                </p>
                            </div>
                            <ul class="info-bottom row">
                                <li class="col-25">
                                    <a class="external" href="/H5/wallet?type=3">
                                        <img src="/H5/images/icon_11.png">团队订单</a>
                                </li>

                                <li class="col-25">
                                    <a class="external" href="/H5/qrcode"><img
                                            src="/H5/images/icon_12.png">邀请代理</a>
                                </li>
                                <li class="col-25">
                                    <a class="external" href="/H5/myshare"><img
                                            src="/H5/images/icon_13.png">我的团队</a>
                                </li>
                                <li class="col-25">
                                    <a class="external" href="/H5/wallet2?type=3"><img
                                            src="/H5/images/icon_13.png">我的佣金</a>
                                </li>

                                <li :if="@data.vip_level>0" class="col-25">
                                    <a class="external"  href="/H5/act"><img
                                            src="/H5/images/icon_14.png">授权证书</a>
                                </li>
                                <li class="col-25">
                                    <a class="external" href="/H5/transfer?type=1"><img
                                            src="/H5/images/icon_14.png">转账</a>
                                </li>
                                <li class="col-25">
                                    <a class="external" href="/H5/draw?type=1"><img
                                            src="/H5/images/icon_14.png">提现</a>
                                </li>
                                <li class="col-25">
                                    <a class="external" href="/H5/chongzhi?type=1"><img
                                            src="/H5/images/icon_12.png">充值</a>
                                </li>


                            </ul>

                            <div>
                                <a href="javascript:;" style="color: #3d4145">
                                    <section class="item-info">
                                        <div   class="t-name">
                                            <span class="fl">预计收益</span>
                                            <span class="fr btn-toggle aa">{{@data.yuji_money}}</span>
                                        </div>
                                    </section>
                                </a>
                                <a href="javascript:;" style="color: #3d4145">
                                    <section class="item-info">
                                        <div   class="t-name">
                                            <span class="fl">总佣金</span>
                                            <span class="fr btn-toggle aa">{{@data.total_money}}</span>
                                        </div>
                                    </section>
                                </a>
                                <a href="javascript:;" style="color: #3d4145">
                                    <section class="item-info">
                                        <div :on-click="@jump('/H5/memberperfect')"  class="t-name">
                                            <span class="fl">完善资料</span>
                                            <span class="fr btn-toggle aa"><img src="/H5/images/right_arrow.png" alt=""></span>
                                        </div>
                                    </section>
                                </a>
                                <a href="javascript:;" style="color: #3d4145">
                                    <section class="item-info">
                                        <div :on-click="@jump('/H5/addresslist')"  class="t-name">
                                            <span class="fl">管理收货地址</span>
                                            <span class="fr btn-toggle aa"><img src="/H5/images/right_arrow.png" alt=""></span>
                                        </div>
                                    </section>
                                </a>
                                <a href="javascript:;" style="color: #3d4145">
                                    <section class="item-info">
                                        <div class="t-name" :on-click="@logout">
                                            <span class="fl">退出登录</span>
                                            <span class="fr btn-toggle aa"><img src="/H5/images/right_arrow.png" alt=""></span>
                                        </div>
                                    </section>
                                </a>
                            </div>
                            <div style="padding: 15px;">
                                <span style="color: red">购物须知：</span>
                                <span style="font-size: 12px;"><br>
                                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;购货须知购货须知购货须知购货须知购货须知购货须知购货须知购货须知购货须知购货须知购货须知购货须知购货须知购货须知
                                </span>
                            </div>
                        </div>

                    </div>



                </div>

                <div id="mask-warp">
                    <div id="web-app">
                        <!--<img src="./web_app_code.jpg" alt="">-->
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<script type='text/javascript' src='/H5/js/zepto.min.js' charset='utf-8'></script>
<script type='text/javascript' src='/H5/js/sm.min.js' charset='utf-8'></script>
<script type='text/javascript' src='/H5/js/avalon.js' charset='utf-8'></script>
<script type='text/javascript' src='/H5/js/simpleStorage.js' charset='utf-8'></script>
<script type='text/javascript' src='/H5/js/mall.js?v=10' charset='utf-8'></script>
<script>
    var members = avalon.define({
        $id: "members",
        data: {},
        message: 0,
        map: {
            total_contribution:"贡献值",
            username: "登录账号",
            real_name: "真实姓名",
            nickname: "会员昵称",
            born: "出生日期",
            level_text:"会员级别",
            id_no: "身份证号  ",
            mobile: "手机号码",
            area_label: "所在地区",
            address: "详细地址",
            email: "会员邮箱",
            bank_type_label: "开户行",
            bank_no: "银行卡号",
            vip_level: "级别"
        },
        filter: function(e, k){
            if( e && members.map[k] ){
                console.log( e, k )
                return e
            }
        },
        jump: function( url ){
            window.location.href = url;
        },
        logout: function(){
            Mall.request("/api/Logout")
                .always(function(data){
                    if( data.error_code == 0 ){
                        simpleStorage.set('token', undefined);
                        simpleStorage.set('isOauth', undefined);
                        window.location.href='/H5/login';
                    }
                })
        },
        getInfo: function(){
            Mall.request( "/api/UserInfo" )
                .always( function( data ){
                    if( data.error_code == 0 ){
                        members.data = data.data;
                        simpleStorage.set('avatar_url', data.data.avatar_url);
                        members.message = data.data.total_unread;
                        /*if(data.data.vip_level == 0){
                            document.getElementById('qrcode').style.display="none";
                        }*/
                        $( ".content" ).removeClass( "visibility" );
                    }
                } )
        }
    });
    members.getInfo();
    var ua = navigator.userAgent.toLowerCase();//获取判断用的对象
    if (ua.match(/MicroMessenger/i) == "micromessenger") {
        //在微信中打开
        document.getElementById('wx_login').style.display="none";
    }else{
      /*  document.getElementById('bind_div').style.display="none";*/
    }
    avalon.scan( document.body )
</script>
</body>
</html>